<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <button>按钮1</button>
        <span>span1</span>
    </div>
    <script>
        // 1.找到要删除的子元素及其父元素
		var div = document.querySelector('div')
		var span = div.querySelector('span');
		// 2.删除
		div.removeChild(span);
    </script>
</body>
</html>